/*
 * @Author: your name
 * @Date: 2021-08-03 15:32:19
 * @LastEditTime: 2021-08-18 22:21:14
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edie
 * @FilePath: \Self\hrsaas-86\src\api\user.js
 */
import request from '@/utils/request'
export function UserLogin(data) {
  return request({
    url: 'sys/login',
    method: 'POST',
    data
  })
}

/**
 * 获取用户资料接口
 * @returns  参数token在请求拦截器中携带
 */
export function getUserInfo() {
  return request({
    url: '/sys/profile',
    method: 'post'
  })
}
/**
 * 获取员工基本信息
 * @param {} id
 * @returns
 */
export function getuserImgById(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
/**
 * 获取部门负责人列表
 * @returns
 */
export function reqGetEmployeeSimple() {
  return request({
    url: '/sys/user/simple'
  })
}
/** *
 * 给用户分配角色
 * ***/
 export function reqAssignRoles(data) {
  return request({
    url: '/sys/user/assignRoles',
    data,
    method: 'put'
  })
}